Previous Book Next


XFaceMaker White Paper



4 Interface layout

In all XFaceMaker products, the interface is designed by simply picking the needed components from widgetstores and laying them out on the screen, just as they would appear in the final application. Once selected and placed on the screen, you can edit widget attributes (in X parlance, resources) to produce the desired design.

The user does not operate on mock-up representations but rather on real Motif objects, which appear on the monitor exactly as they will appear in the final application. The tool also provides various other representations of the interface, as needed, to help navigate through widget hierarchies or to make changes more quickly.

In the Widget Stores the developer can find Motif widgets, groups of widgets he has created, templates or style sheets, widget classes he has built himself, and third party widget classes.

Powerful design features

The XFaceMaker product line has specialized features and tools for handling the numerous details that make the difference in building a good interface:

Editing resources

All XFaceMaker products provide a separate pop up window to edit the resources of a widget. The resources are listed in a scrollable window and pop up dialog boxes are provided to enter the value of the resource. These range from simple toggles for booleans, to the sophisticated ones used for fonts, bitmaps and translations. Resources in the resource list are marked with an icon which indicates their nature (default, inherited, fixed, etc.). Resources can be sorted by different criteria and it is possible to place often used ones in a separate part of the list for easy access.

Multiple resource editing windows can be opened simultaneously on several widgets and it is possible to cut and paste between resource windows.

Specifying the behavior part in XFaceMaker/EL and XFaceMaker appears to the user as simply editing a textual callback resource. For example, to add the behavior corresponding to the "activate" event of a pushbutton, it suffices to click on the "activate" resource and an appropriate text editor will pop up. A callback resource is thus treated as a special text resource.

All XFaceMaker products provide several choices for editing text resources. One can use either a simple text widget, which is all that is needed in simple cases. For long text resources, the XFaceMaker line is the only one in the market to provide an embedded full-featured text editor (NSL's powerful Wx editor) or to allow you to use your favorite text editor, say Vi or Emacs.

Reusing objects in XFaceMaker

Reusability of GUI components is one of the most important factors in XFaceMaker's success as a high productivity tool. Reusability of GUI portions not only saves development time, it is also invaluable in implementing workgroup or corporate development standards.

A reusable component may be a complex object, for example a dialog box, together with all its resources, including its textual behavioral resources. When you save a complex dialog box as a reusable component, it includes the associated behavior in the form of the scripts.

The XFaceMaker product line provides three main facilities for reusing objects or portions of GUIs:

You create a group, a template or a class in the same way - by simply assembling an instance from existing components. The difference between these three notions is in their implementation, properties and persistence.

Groups

A group is simply a collection of widgets which you can then reuse at will, very similar to cutting and pasting. You can modify the properties (resources) of widgets in a group, but properties of the original group are then lost, unless you restore them explicitly. Groups can of course be saved in a storage format and reused in a later session.

Templates

Templates are a more permanent form of reusable objects than groups. Once created a template can be instantiated at will and will appear with its icon in the Template Store. To create an instance of the template you simply drag it on the interface like an ordinary Motif widget.

In contrast with groups, instances of templates inherit their resources from the template. It suffices to change the template and all the instances will change accordingly. Thus templates are very useful for enforcing interface standards throughout a workgroup, a division or even a corporation.

Templates can be used to define other templates. For example, you can define a file selection template that will be used in an option selection box. If you change the file selection template, the option selection box will inherit resources from it and change accordingly: naturally, so will all instances patterned after the option selection box.

Templates can also be used as style sheets. For example you can create a Helvetica label template and then, instead of instantiating it, apply it to an existing label or even to a different widget, say, a button. The widget to which the template is being applied will inherit the applicable resources of the template, in this case, the font.

One can also apply several templates to the same widget and the widget will inherit resources from all. In case of conflict, the last application prevails. Thus templates implement a form of multiple inheritance.

A template can be saved in one of two modes, default or override, which define how the resources of the template will be applied to its instances. In default mode, the resource values which were defined in the template are used as default values, but they can be changed in the instance to another value. In override mode, the resource values cannot be changed in the instance of the template; the resources are "locked" and can only be changed in the template itself.

Templates saved in override mode are very useful for enforcing company-wide interface styles. The company templates can be produced by a team of designers and then distributed to other teams.

Templates can be stored in ASCII format in a file for later use in the interface description format and the files can also be edited directly in an ordinary text editor. The template mechanism used in the XFaceMaker product line is the most powerful, productive and easy-to-use in the industry.

Xt and C++ widget classes

The XFaceMaker product line is the only one in the industry to provide the capability of building new X Intrinsics or C++ widget classes. This capability is only available in the XFaceMaker product.

XWidgetMaker allows the user to create an Xt or C++ widget class from an interface, or portion of it, built interactively with XFaceMaker. Technically, XFaceMaker will generate the C code for the corresponding X Intrinsics or C++ class. The programmer no longer has to program this part manually. The widget class so generated can then be reused within or outside of


XFaceMaker.


XFaceMaker allows you to add new resources for classes. This feature is implemented in a very elegant way through the active value mechanism that is an essential characteristic of the
XFaceMaker.

The inheritance mechanisms are those supported by the X Intrinsics or C++.

One very important feature of the XFaceMaker's X Intrinsics class generation capability is the immediate availability of generated classes within the tool with no need for further linking or loading. This feature allows users to define portions of an interface as a widget class and then immediately use them for the definition of other classes. No other tool on the market offers this capability.

New widgets can be seen as a long term way of storing interface GUI components. With


XFaceMaker, designing a new widget class is as easy as defining a group. As a result, many users use it for the most routine tasks, where it would have been unthinkable to use widgets previously. The benefits of the Xt and C++ class concept are thus available even to relatively inexperienced users.

Previous Book Next